# Maintainer: Hoang Nguyen <folliekazetani@protonmail.com>
pkgname=pulumi-language-dotnet
pkgver=3.63.1
pkgrel=0
pkgdesc="Infrastructure as Code SDK (.NET language provider)"
url="https://pulumi.com/"
# blocked by pulumi
arch="x86_64 aarch64"
license="Apache-2.0"
depends="pulumi"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/pulumi/pulumi-dotnet/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/pulumi-dotnet-$pkgver/pulumi-language-dotnet"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	mkdir -p bin

	go build -v \
		-o bin/pulumi-language-dotnet \
		-ldflags "-X github.com/pulumi/pulumi-dotnet/pulumi-language-dotnet/version.Version=v$pkgver"
}

check() {
	go test ./...
}

package() {
	install -Dm755 bin/pulumi-language-dotnet -t "$pkgdir"/usr/bin/
}

sha512sums="
4b2e3f05061b90060101a272ff7fcabc15ef73d26325ca52f919093bbe153b5e4e651f5d113a0dd2020465c2e47a8667b67f01e45f5b3a1f525bcbe9f9ae4ccc  pulumi-language-dotnet-3.63.1.tar.gz
"
